//
//  QDSDCycleViewTableViewCell.h
//  QDMetroClient
//
//  Created by YueWen on 2019/1/18.
//  Copyright © 2019 YueWen. All rights reserved.
//

#import "NWTableViewCell.h"
#import "RITLSDCycleScrollView.h"

NS_ASSUME_NONNULL_BEGIN


/// 用于替代 setupCustomCell
typedef void(^QDSDCycleViewCustomHandler)(SDCycleScrollView *cycleView,
                                          UICollectionViewCell *cell,
                                          NSIndexPath *indexPath);

// 用于替代 didSelectItemAtIndex
typedef void(^QDSDCycleViewDidSelectHandler)(SDCycleScrollView *cycleView,
                                             NSInteger index);

// 用于替代 cycleViewAllRegisterCellClasses
typedef NSDictionary<NSString *, Class>* _Nonnull(^QDSDCycleViewConfiguration)(SDCycleScrollView *cycleView);


// 用于替代 cycleViewIdentifer
typedef NSString * _Nonnull(^QDSDCycleViewIdentifierConfiguration)(SDCycleScrollView *cycleView,
                                                                   NSIndexPath *indexPath);


/// 搭载 RITLSDCycleView 的 tableViewCell
@interface QDSDCycleViewTableViewCell : NWTableViewCell <RITLSDCycleScrollViewDataSource,SDCycleScrollViewDelegate>

/****  如果不单独设置cycleView代理，可以使用的block属性  ****/

/// 每个信息进行自定义赋值的block
@property (nonatomic, copy, nullable) QDSDCycleViewCustomHandler customHandler;
/// 每个信息进行点击的block
@property (nonatomic, copy, nullable) QDSDCycleViewDidSelectHandler selectHandler;
/// 展示的cell样式标志id
@property (nonatomic, copy, nullable) QDSDCycleViewConfiguration configCellConfiguration;
/// 对所有的cell样式以及identifer比对
@property (nonatomic, copy, nullable) QDSDCycleViewIdentifierConfiguration configCellIdentifierHandler;

/****  如果不单独设置cycleView代理，可以使用的block属性  ****/

/// 轮播视图布局间距，默认为.zero
@property (nonatomic, assign) UIEdgeInsets cycleContentInsets;
/// 轮播视图
@property (nonatomic, strong) RITLSDCycleScrollView *cycleView;

/**
 轮播视图进行约束布局
 @param view 进行布局的轮播视图
 */
- (void)makeCycleViewConstraints:(RITLSDCycleScrollView *)view;

@end

NS_ASSUME_NONNULL_END
